package com.cib.process.chat.core.handler.impl;

import com.cib.process.bean.CheckType;
import com.cib.process.bean.ServiceResult;
import com.cib.process.chat.bean.CommonResult;
import com.cib.process.chat.bean.PlayType;
import com.cib.process.chat.bean.QueryResult;
import com.cib.process.chat.core.handler.ActionHandler;
import org.springframework.stereotype.Service;

@Service
public class OverActionHandler implements ActionHandler {
    @Override
    public ServiceResult execute(QueryResult queryResult) {
        CommonResult result=new CommonResult();
        result.setType(PlayType.TTS);
        result.setContext(queryResult.getSuggestAnswer());
        result.setCanbreak(CheckType.N.name());
        return ServiceResult.buildSuccessResult(result,queryResult.getSessionId(),queryResult.getAction());
    }
}
